#include "../include/queue.h"

inline bool queue_is_empty(const queue_t * head) {
	return dlist_is_empty(head);
}

inline void queue_push(queue_t * head, queue_t * entry) {
	dlist_add_tail(head, entry);
}

inline queue_t * queue_pop(queue_t * head) {
	queue_t * p;
	if (dlist_is_empty(head)) {
		return NULL;
	}	
	p = head->next;
	dlist_del(head, p);	
	return p;
}
inline void queue_empty(queue_t * head) {
	dlist_empty(head);
}

inline bool queue_is_exist(const queue_t * head, const queue_t * entry) {
	return dlist_is_exist(head, entry);
}
